<?php

namespace app\services;

use Webman\RedisQueue\Redis;

class RedisQueue
{
    public static function orderNotify($params)
    {
        // 队列名
        $queue = 'order-notify';
        // 投递消息
        $result = Redis::send($queue, $params);
        if (!$result){
            throw new \Exception('消息投递失败');
        }
    }

    public static function vipOrderReward($params)
    {
        $queue = 'vip-order-reward';
        return Redis::send($queue, $params);
    }

}